﻿using Minotaur.App.Core;
using Minotaur.App.Modules.SystemSet.Views;
using Prism.Ioc;
using Prism.Modularity;
using Prism.Regions;

namespace Minotaur.App.Modules.SystemSet
{
    public class SystemSetModule : IModule
    {
        private readonly IRegionManager _regionManager;

        public SystemSetModule(IRegionManager regionManager)
        {
            _regionManager = regionManager;
        }

        public void OnInitialized(IContainerProvider containerProvider)
        {
            _regionManager.RequestNavigate(RegionNames.ContentRegion, "404");
        }

        public void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterForNavigation<Menu>("menu");
            containerRegistry.RegisterForNavigation<NotFound>("404");
            containerRegistry.RegisterForNavigation<Table>("table");
            containerRegistry.RegisterForNavigation<InfoPath>("infopath");
            containerRegistry.RegisterForNavigation<FieldManager>("fieldmanager");
            containerRegistry.RegisterForNavigation<Resources>("resources");
            containerRegistry.RegisterForNavigation<SystemLog>("syslog");
            containerRegistry.RegisterForNavigation<OfficeView>("officeview");

        }
    }
}